package uk.co.richardwkirk.parkrun.funnels.model;

public class Runner {

	protected String name;
	protected int position;
	protected long finishTime;
	
	public Runner(String name_, int position_, long finishTime_)
	{
		name = name_;
		position = position_;
		finishTime = finishTime_;
	}
	
	public long getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(long time) {
		finishTime = time;
	}

	public String getName() {
		return name;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean equals(Object other)
	{
		if (this == other) {
			return true;
		}
		else if (other instanceof Runner) {
			Runner otherRunner = (Runner) other;
			return this.name.equals(otherRunner.name)
						&& this.position == otherRunner.position
						&& this.finishTime == otherRunner.finishTime;
		}
		return false;
	}
}
